package com.youshang520i.thread1;

/**
 * @author youshang
 * @date 2021/03/25 09:54
 **/
public class SynchronizedTest2 {
    private Object object = new Object();
    public  void method1(){
        synchronized(object){
            System.out.println("hello world!!!");
        }
    }


    public static void main(String[] args) {
        SynchronizedTest2 synchronizedTest2 = new SynchronizedTest2();
        synchronizedTest2.method1();
    }
}
